/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package lanSimulation.tests;
import java.io.StringWriter;
import lanSimulation.internals.PSDocument;
import lanSimulation.LogManager;
/**
 *
 * @author Administrator
 */
public class PSDocumentTest extends DocumentTest{

    @Override
 public void testPrint(){

        StringWriter writer = new StringWriter();
        LogManager logMan = new LogManager(writer);
        
        PSDocument document =  new PSDocument("!PS Hello World in postscript.author:Filip.title:Hello.");
        document.print(logMan);

        String test = "\tAccounting -- author = 'Filip' -- title = 'Hello'\n";
        test += ">>> Postscript job delivered.\n\n";

        assertEquals(test, writer.getBuffer().toString());
  
  }
}
